SetLoads {Buckling}

SetLoads

Syntax

SapObject.SapModel.LoadCases.Buckling.SetLoads

VB6 Procedure

Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef LoadType() As String, ByRef LoadName() As String, ByRef SF() As Double) As Long

Parameters

Name

The name of an existing buckling load case.

NumberLoads

The number of loads assigned to the specified analysis case.

LoadType

This is an array that includes either Load or Accel, indicating the type of each load assigned to the load case.

LoadName

This is an array that includes the name of each load assigned to the load case.

If the LoadType item is Load, this item is the name of a defined load pattern.

If the LoadType item is Acce, this item is UX, UY, UZ, RX, RY or RZ, indicating the direction of the load.

SF

This is an array that includes the scale factor of each load assigned to the load case. [L/s
2
] for Accel UX UY and UZ; otherwise unitless

Remarks

This function sets the load data for the specified analysis case.

The function returns zero if the data is successfully set; otherwise it returns a nonzero value.

VBA Example

Sub SetCaseBucklingLoads()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret As Long

Dim MyLoadType() As String

Dim MyLoadName() As String

Dim MySF() As Double

'create Sap2000 object

Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application

SapObject.ApplicationStart

'create SapModel object

Set SapModel = SapObject.SapModel

'initialize model

ret = SapModel.InitializeNewModel

'create model from template

ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add buckling load case

ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'set load data

ReDim MyLoadType(1)

ReDim MyLoadName(1)

ReDim MySF(1)

MyLoadType(0) = "Load"

MyLoadName(0) = "DEAD"

MySF(0) = 0.7

MyLoadType(1) = "Accel"

MyLoadName(1) = "UZ"

MySF(1) = 1.2

ret = SapModel.LoadCases.Buckling.SetLoads("LCASE1", 2, MyLoadType, MyLoadName, MySF)

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in version 11.02.

Changed nomenclature from Load Cases, Analysis Cases and Response Combinations to Load Patterns, Load Cases and Load Combinations, respectively, in version 12.00.

See Also

GetLoads